﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Satates;
using Algorithms;
using Satates.WaterCupState;
using Operators;
using Algorithms.Depth;

namespace PresentationWpf.TemplateMethod
{
    public abstract class AbstractClass
    {
        public abstract Algorithms.iStrategy GetStrategy(string strategy);
        public abstract State GetInitialState(string state);
        public abstract List<State> GetFinalsStates(string state);
        public abstract List<iOperator> GetListOperators(string state);

        public void TemplateMethod(ref  List<string> result, ref Arbore.Arbore Ab,string state, string strategy)
        {
            iStrategy Strategy= new DepthStrategy();
             State stateIni;
            List<State> Finals;
            List<iOperator> operators;
            stateIni = WaterCupState.initalState();
            Finals = WaterCupState.finalStates();
            Strategy=  GetStrategy( strategy);
            stateIni=GetInitialState(state);
            Finals=  GetFinalsStates(state);
            operators = GetListOperators(state);
            Context w = new Context(Strategy);
            w.executeStrategy(stateIni, Finals, operators, ref  result, ref Ab);
       }
}
}